﻿using System.Data;
using Pantry.DataAccess;

namespace Pantry.Business
{
    public class TypeOfBusinessBus
    {
        public DataView ReturnSearchValue(string businessname, string code)
        {
            var connection = SqlConnectionTool.SqlGetConnection();
            return new TypeOfBusinessSearchDao().ReturnSearchValue(businessname, code, connection);
        }
        public DataSet ListTypeOfBusinessToDataSet()
        {
            var connection = SqlConnectionTool.SqlGetConnection();
            return TypeOfBusinessSearchDao.GetAddressesToDataSet(connection);
        }
        public DataTable TypeOfBusinessById(int businessId)
        {
            var sqlConnection = SqlConnectionTool.SqlGetConnection();
            return TypeOfBusinessSearchDao.TypeOfBusinessById(businessId);
        }
    }
}
